import javax.xml.crypto.dsig.CanonicalizationMethod;

public class AnonymousClass {

    class A {
        public void f(){
            System.out.println("Inside A");
        }
    }

    static class B {
        public void g(){
            System.out.println("Inside B");
        }
    }

    public static void main(String[] args) {
        AnonymousClass obj = new AnonymousClass();
        AnonymousClass.A inside_a = obj.new A();
        inside_a.f();

        AnonymousClass.B b = new AnonymousClass.B();
        b.g();

        AnimalShout(new AnonymousClass(){
            public void shout(){
                System.out.println("Inside AnonymousClass");
            }
        });
        AnimalShout(new AnonymousClass());
    }

    public void shout(){
        System.out.println("Inside AnonymousClass11111");
    }

    public static void AnimalShout(AnonymousClass an){
        an.shout();
//        System.out.println("Inside shout");
    }
}
